package team.szm.scd.service.impl;

import lombok.SneakyThrows;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
import team.szm.scd.database.dto.CaseUploader;
import team.szm.scd.database.entity.Case;
import team.szm.scd.utils.TimeUtils;

import java.time.LocalDateTime;
import java.time.LocalTime;

@Service
@Profile("test")
public class TestCaseServiceImpl extends AbstractCaseService {
    @SneakyThrows
    @Override
    public boolean uploadCase(CaseUploader uploader, LocalDateTime now) {
        now = LocalDateTime.of(TimeUtils.testNowDate(), LocalTime.now());
        return super.uploadCase(uploader, now);
    }
}
